﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;

/// <summary>
/// LibraryManageBll 的摘要说明
/// </summary>
public class LibraryManageBll:DataBase
{
    public LibraryManageBll()
    {
        //
        // TODO: 在此处添加构造函数逻辑
        //
    }
    #region 修改--图书馆信息
    /// <summary>
    /// 修改--图书馆信息
    /// </summary>
    /// <param name="librarymanage"></param>
    /// <returns></returns>
    public int UpdateLib(LibraryManageEntity librarymanage)
    {
        SqlParameter[] prams = {
            this.MakeInParam("@libraryname",  SqlDbType.VarChar, 50,librarymanage.LibraryName ),
            this.MakeInParam("@curator",  SqlDbType.VarChar, 20, librarymanage.Curator ),
            this.MakeInParam("@tel",  SqlDbType.VarChar, 20, librarymanage.Tel ),
            this.MakeInParam("@address",  SqlDbType.VarChar,100, librarymanage.Address ),
            this.MakeInParam("@email",  SqlDbType.VarChar, 100, librarymanage.Email ),
            this.MakeInParam("@url",  SqlDbType.VarChar, 100, librarymanage.URL ),
            this.MakeInParam("@createdate",  SqlDbType.DateTime, 8, librarymanage.CreateDate ),
            this.MakeInParam("@introduce",  SqlDbType.Text, 4000, librarymanage.Introduce ),
            };
        return (this.RunProc("update tb_library set libraryname=@libraryname,curator=@curator,tel=@tel,address=@address,"
            + "email=@email,url=@url,createDate=@createdate,introduce=@introduce", prams));
    }
    #endregion
}